About packages.yml context
The following context methods and variables are available when configuring a packages.yml file.
Available context methods:
- env_var
- Use
env_var()in any dbt YAML file that supports Jinja. Onlypackages.ymlandprofiles.ymlsupport environment variables for secure values (using theDBT_ENV_SECRET_prefix).
- Use
- var (Note: only variables defined with
--varsare available. Refer to YAML tips for more information)
Available context variables:
packages:
- package: dbt-labs/dbt_utils
version: "{% if builtins is defined %}0.14.0{% else %}0.13.1{% endif %}"
packages:
- package: dbt-labs/dbt_utils
version: "{% if dbt_version is defined %}0.14.0{% else %}0.13.1{% endif %}"
packages:
- package: dbt-labs/dbt_utils
version: "{% if env_var('DBT_ENV_NAME') == 'prod' %}0.14.0{% else %}0.13.1{% endif %}"
Related docs
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
0